public class Director extends Approver {
    public Director(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest request) {
        if (request.getAmount() < 4000) {
            System.out.println(name + " 审批了金额为 " + request.getAmount() + " 的采购单，编号：" + request.getNumber());
        } else if (successor != null) {
            successor.processRequest(request);
        }
    }
}
